/*
This file creates the county-level child care cost file.
*/

import excel using "U:\Import\ImportRequest_06272023\nationaldatabaseofchildcareprices.xlsx", clear firstrow
g hh_under6 = H_Under6_BothWork +H_Under6_FWork+ H_Under6_MWork+ H_Under6_SingleM
collapse (mean) MCToddler [fw=hh_under6], by(County_FIPS_Code)
xtile CC_centile =MCToddler, nq(100)
g abovemedianCC = CC_centil > 50
rename County_FIPS_Code resp_statecounty
save "U:\dtafiles\childcare_clean.dta", replace